1. Field of the Invention
The invention pertains to the art of image processing systems and, more particularly, to error diffusion techniques for rendering multibit graylevel images containing continuous tone, text, halftones etc. to a binary pattern of dots for the purpose of printing or displaying on an imaging device. More specifically, the present invention is directed to a dynamic error diffusion process for hybrid screening wherein the error diffusion weighting coefficients are dynamically calculated based on a physical characteristic of the image data being processed.
2. Description of Related Art
Image information, be it color or black and white, is derived by scanning a large number of gray levels; e.g., 256 levels of black and white and more than 16 million levels of color, gray level image data presented as a large multi-level value. The large multi-level value is usually unprintable by standard printers since standard printers print a limited number of levels, either a spot or no spot in a binary printer, or a limited number of levels associated with the spot, for example, four in the quaternary case. Accordingly, it is necessary to reduce the multi-level gray image data to a limited number of levels so that it is printable.
There are many methods of rendering multi-level input gray images on a low level output device. One standard method of converting gray level pixel image data to binary level pixel image data is through the use of dithering or halftoning processes. In such arrangements, over a given area, each gray level pixel within the area is compared to one of a set of preselected thresholds. The effect of such an arrangement is that, for an area where the image is gray, some of the thresholds will be exceeded, while others are not. In the binary case, the pixels in the area in which the threshold is exceeded are printed as black, while the remaining pixels are allowed to remain white. The effect of the distribution of black and white over the given area is integrated by the human eye as gray. Dithering presents problems, however, in that the amount of gray within an original image is not maintained over an area, i.e., the error arising from the difference between the threshold value and the actual gray level value at any particular cell pixel is simply thrown away. This results in loss of image information. However, proper screen design with more graylevels could result in good output image quality.
Algorithms that convert gray images to binary or other number of level images while attempting to preserve the local density include error diffusion processing. Error diffusion can render complex images that contain a mixture of text and picture data reasonably well. The utilization of error diffusion can eliminate the need to have image segmentation which identifies which image data, i.e., pixel, corresponds to text and which pixel corresponds to a picture. Normally, this identification process is necessary so that the picture aspect of the document can be screened and the text aspect of the document can be thresholded.
An example of a typical error diffusion process is fully described in U.S. Pat. No. 5,226,094 to Eschbach entitled xe2x80x9cMethod for Making Image Conversions With Error Diffusionxe2x80x9d, the entire contents of which are hereby incorporated by reference. More examples of error diffusion processes with modifications to the error calculation and weight allocation are fully described in U.S. Pat. No. 4,924,322 to Kurosawa et. al., U.S. Pat. No. 4,339,774 to Temple, and U.S. Pat. No. 4,955,065, to Ulichney. The entire contents of U.S. Pat. No. 4,924,322, U.S. Pat. No. 4,339,774, and U.S. Pat. No. 4,955,065 are hereby incorporated by reference.
Error diffusion attempts to maintain gray by making the conversion from gray pixels to binary or other level pixels on a pixel-by-pixel basis. The procedure examines each pixel with respect to a threshold, and the difference between the gray level pixel value and the threshold is then forwarded to a selected group of neighboring pixels, in accordance with a weighting scheme.
Modern digital images increasingly include both text and picture images, thus, attempts have been made to develop an algorithm that produces superior results on input images containing both text/edge segments and contone/halftone segments. For example, FIG. 1 shows such an image. The image is generally designated 10. Included in the image are text segments 12, 14, contone segment 16 and halftone segment 18. Preferably a system would analyze the input image 10, recognize the different segments 12-18, and apply the proper processing to each segment. It is typically desirable to apply a high modulation screen to input image data representative of pictorial elements and a low modulation screen plus an error diffusion technique to input image data representative of text/edge elements. It should be noted that the segments could also include halftones further classified by frequency, edge segments, or background segments for example.
One particular method discussed in U.S. Pat. No. 5,317,653, to Eschbach, is assigned to the assignee of the present invention, and is incorporated herein by reference. Eschbach discloses essentially a hybrid or two step approach. A screen is applied to the input image, then that result is error diffused. In such a hybrid screening approach, a conventional screen is applied to the input video resulting in modified video. Unfortunately, in conventional hybrid screening, one error distribution weight is typically used for the entire image. That is, regardless of which segment the method is processing, a pre-programmed flow of error diffused pixels continues downstream. Artifacts from this xe2x80x9coverflowxe2x80x9d become most noticeable in transitional regions especially between high modulation screening (i.e. contone/halftone) and low modulation screening (i.e. text/edge).
However, it would be desirable to provide for the application of a plurality of screens at various modulations to help in rendering complex images containing a mixture of text and pictorials. For example, in an 8-bit video system the modified video after the application of a screen is obtained as:
Modified Video=255+Sxe2x88x92V
Where S is a screen threshold value and V is the input video value. The dynamic range of the modified video of a 100% modulated screen (ranging between 0 and 255 for an 8 bit system) would be 0xe2x86x92511. On the other hand, use of a 0% modulation screen (i.e. no screening, only error diffusion with a threshold level of 128), results in the modified video having a dynamic range of 128xe2x86x92383. Other intermediate modulations result in a dynamic ranges from Xxe2x86x92Y where 0 less than X less than 128, and 511 greater than Y greater than 383.
Ideally, for better rendition of different image segments, the pictorials (continuous tone and halftone) need to be xe2x80x9cpurelyxe2x80x9d screened (conventional screening) and text/edges need to be error-diffused. While trying to switch between these two rendering schemes based on segmentation classes, image artifacts are generated due to misclassifications in the transition regions. The hybrid screening approach suggested by Eschbach helps in avoiding artifacts by applying screen and performing error-diffusion everywhere. This though, results in xe2x80x9cnoisy lookingxe2x80x9d pictorials due to error-diffusion. Thus, a need exists for a method to apply xe2x80x9cpurexe2x80x9d screen on pictorials and error-diffusion on text/edges without causing any noticeable image artifacts from propagating error selectively in the transition regions.
An improvement over conventional hybrid screening systems disclosed in commonly assigned U.S. application Ser. No. 08/285,324, is assigned to the assignee of the present invention and incorporated herein by reference. The improvement therein pertains to the set of weighting coefficients used by the error diffusion process. While some error diffusion systems used a fixed set of weighting coefficients selected in the design stage for use on all image types, the Ser. No. 08/285,324 system selects from a stored set of potential weights depending on image classification. In other words, error coefficients are roughly selected based on the classification of the image. Unfortunately, this method relies on a relatively costly memory intensive look-up table. Also the weights are essentially limited to the look-up value and cannot selectively varyxe2x80x94even when such variance may be particularly desirable such as across a transition region.
All the hybrids above diffuse some amount of residual error into transition areas. For example, consider an image undergoing heavy error diffusion (that is, employing maximum weighting coefficients to diffuse image shading information downstream). When this area of heavy error diffusion transitions into an area requiring pure screening (i.e. no error diffusion), the next few scan lines will contain artifacts from the error diffusion process in the transition area. In other words, the errors computed from a previous classification area will undesirably xe2x80x9cdumpxe2x80x9d into the new classification area.
The present invention contemplates a new, efficient method of reducing the artifacts encountered while a hybrid screening system switches between different classifications of input areas.
In accordance with a first aspect of the present invention, a method for diffusing an error generated from thresholding a gray level value representing a pixel is provided. The method includes segmenting an image based on an image characteristic of a pixel within the image and screening the pixel in correspondence with the image characteristic. An an error value for the pixel is then generated, and an image context error is computed corresponding to the error value and the image characteristic. Then the image context error is diffused to a plurality of selected other pixels.
In accordance with another embodiment of the present invention, the processing step includes screening the image signal with a modulation value based on the image characteristic, thereby producing a screened video. Then the diffused image context errors from a previous pixel are added to the screened video thereby producing an error diffused video. The error diffused video is binarized thereby producing an error diffused output video signal.
In accordance with another aspect of the present invention, a method of reducing output image artifacts in an imaging system including a hybrid screening system is provided. The method includes segmenting an image signal in accordance a pixel classification based on a determined image characteristic. Then the image signal is screened with a modulating factor based on the pixel classification, thereby producing a screened video. Both an error diffusion processing thereby producing an error diffused output video signal; and a simple thresholding thereby producing a bypass output video signal are applied in parallel to the screened video. Then an output video signal is selectively generated from either the error diffused output video signal or the bypass output video signal based on the pixel classification.
In yet another aspect of the present invention, there is provided an imaging system including an image segmentation means for segmenting an image signal into a pixel classification based upon selected image characteristics, the image signal having a predetermined number of levels. Also, a screening module for selectively modulating the image signal into a modified video signal based on the pixel classification and a binarization module for converting the modified video signal into a digital output video signal are provided. Also, an error feedback loop for generating an error value, the error value being the difference between the modified video signal and the output video signal and an image context error computer for computing an image context error corresponding to the error value and a pixel classification change factor; along with diffusing means for diffusing the image context error to a plurality of selected pixels are included.
One benefit obtained by use of the present invention is a reduction of artifacts in image transition areas produced by switching of screen modulation levels in a hybrid screening system.
Another benefit obtained by use of the present invention is a simple hardware implementation of controlled error propagation.
Other benefits and advantages of the subject new method will become apparent to those skilled in the art upon a reading and understanding of this specification.